package com.ruoyi.applet.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.applet.service.IAppletCountInfoService;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.AppletCountInfoMapper;
import com.ruoyi.db.domain.AppletCountInfo;


/**
 * 公众号二维码统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class AppletCountInfoServiceImpl implements IAppletCountInfoService
{
    @Autowired
    private AppletCountInfoMapper appletCountInfoMapper;

    /**
     * 查询公众号二维码统计
     * 
     * @param id 公众号二维码统计主键
     * @return 公众号二维码统计
     */
    @Override
    public AppletCountInfo selectAppletCountInfoById(Long id)
    {
        return appletCountInfoMapper.selectAppletCountInfoById(id);
    }

    /**
     * 查询公众号二维码统计列表
     * 
     * @param appletCountInfo 公众号二维码统计
     * @return 公众号二维码统计
     */
    @Override
    public List<AppletCountInfo> selectAppletCountInfoList(AppletCountInfo appletCountInfo)
    {
        return appletCountInfoMapper.selectAppletCountInfoList(appletCountInfo);
    }

    /**
     * 查询公众号二维码统计列表
     *
     * @param appletCountInfo 公众号二维码统计
     * @return 公众号二维码统计
     */
    @Override
    public List<Map<String, Object>> selectAppletCountInfoMapList(AppletCountInfo appletCountInfo)
    {
        return appletCountInfoMapper.selectAppletCountInfoMapList(appletCountInfo);
    }

    /**
     * 新增公众号二维码统计
     * 
     * @param appletCountInfo 公众号二维码统计
     * @return 结果
     */
    @Override
    public int insertAppletCountInfo(AppletCountInfo appletCountInfo)
    {
        appletCountInfo.setCreateTime(DateUtils.getNowDate());
        return appletCountInfoMapper.insertAppletCountInfo(appletCountInfo);
    }

    /**
     * 修改公众号二维码统计
     * 
     * @param appletCountInfo 公众号二维码统计
     * @return 结果
     */
    @Override
    public int updateAppletCountInfo(AppletCountInfo appletCountInfo)
    {
        return appletCountInfoMapper.updateAppletCountInfo(appletCountInfo);
    }

    /**
     * 批量删除公众号二维码统计
     * 
     * @param ids 需要删除的公众号二维码统计主键
     * @return 结果
     */
    @Override
    public int deleteAppletCountInfoByIds(Long[] ids)
    {
        return appletCountInfoMapper.deleteAppletCountInfoByIds(ids);
    }

    /**
     * 删除公众号二维码统计信息
     * 
     * @param id 公众号二维码统计主键
     * @return 结果
     */
    @Override
    public int deleteAppletCountInfoById(Long id)
    {
        return appletCountInfoMapper.deleteAppletCountInfoById(id);
    }
}
